/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.core.ui.properties.advanced;

import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.views.properties.PropertyDescriptor;


/**
 * 
 */
public class CreateValuePropertyDescriptor extends PropertyDescriptor{
	
	/**
	 * 
	 */
	protected Class dialog;
	
	/**
	 * 
	 * 
	 * @param dialog 
	 * @param id 
	 * @param displayName 
	 */
	public CreateValuePropertyDescriptor(Object id,String displayName,Class dialog){
		 super(id, displayName);
		 this.dialog=dialog;
		 
	}
	
	/**
	 * 
	 * 
	 * @param parent 
	 * 
	 * @return 
	 */
	@Override
	public CellEditor createPropertyEditor(Composite parent){
		
		 CellEditor editor = new CreateValueCellEditor(parent, dialog);
   if (getValidator() != null) {
	editor.setValidator(getValidator());
}
   return editor;
}

}
